<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>demo3</title>
	<script type="text/javascript">
		arr = [1,56,57,6,43,87,3,5,55,8888888];
		function arrMax(arr){
			arrLen=arr.length;
		
			maxi=0;
			for(i=0;i<arrLen;i++){
				 if(arr[maxi]<arr[i+1]){   //56,  23
					maxi=i+1;              //1   1+1
				}                           //i   i+1
			}
			return arr[maxi];
		}

		res=arrMax(arr);
		document.write("最大的值是："+res);
		document.write("<hr>");
		//自己写一个函数,用来取得二维数组中长度最大的子数组
		arr1=[[12,23,12,45,13,66,000],[12,77,55,44],[99,58]];
		// alert(88.length)
		function isArrlen(arr){ instanceof 
			mlen=0;
			len=arr.length;
 				for(i=0;i<len;i++){
 					if(arr[mlen]<arr[i+1]){
 						mlen=i+1;
 					}
 					//mlen[i]=arr[i].length;
 				}
 				return arr[mlen];
				 //return mlen;//console.log(mlen);
		}
		res=isArrlen(arr1);
		console.log(res);
		//console.log(res);
		//console.log(isArrlen(arr1));
	</script>
</head>
<body>
	
</body>
</html>